<template>
  <van-nav-bar
    :title="title"
    :right-text="rightTxt"
    left-arrow
    @click-left="onClickLeft"
    @click-right="$emit('rightClick')"
  />
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  name: 'Tabbar',
  props: {
    title: {
      type: String,
      default: ''
    },
    rightTxt: {
      type: String,
      default: ''
    }
  },
  setup() {
    const onClickLeft = () => history.back()

    return {
      onClickLeft
    }
  }
})
</script>

